home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 March / CHIP Mart 1997.iso / SurfCam / SURFCAM.Z / MZK2.M4 < prev    next >
Text File  |  1996-04-01  |  4KB  |  150 lines

  1. name Mazak M2 4 Axis (Simultaneous & Indexing)
  2.  
  3. % 00
  4. / 00
  5. O >4
  6. N >4
  7. G >2
  8. g >2 G
  9. X ->3.>4
  10. Y ->3.>4
  11. Z ->3.>4
  12. A ->3.>3 Limit -360 360
  13. I ->3.>4
  14. J ->3.>4
  15. K ->3.>4
  16. Q ->3.>4
  17. R ->3.>4
  18. P ->3.>4
  19. F >3.2
  20. H >2
  21. D >2
  22. T >2
  23. M >2
  24. S >4
  25.  
  26. ModalLetters X Y Z F A                # List of letters that are modal    
  27.  
  28. ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85  # List of g codes that are modal    
  29.  
  30. Sequence#s N 0 1 1                    # Char, freq, incr & start          
  31. First#? N                             # Y or N  'Output 1st sequence no.  
  32. Last#? N                              # Y or N  'Output last sequence no. 
  33.  
  34. HCode X                               # X or X U  'Horizontal char.       
  35. VCode Y                               # Y or Y V  'Vertical char.         
  36. Dcode Z                               # Depth char.                       
  37. FeedCode F                            # Feed rate char.                   
  38.  
  39. Comment ( )                           # Begin End comment char.           
  40.  
  41. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  42. Coolant 8 9 7                         # On, Off & Mist m codes            
  43. DComp 41 42 40                        # Left, Right & Cancel m codes      
  44. LComp 43 49                           # On & Off codes                    
  45.  
  46. Feed G1                             # Linear move                       
  47. Rapid G0                            # Rapid positioning word            
  48. Cw G2                               # Circular move clockwise           
  49. Ccw G3                              # Circular move counter clockwise   
  50. CtrCode I J                           # I J or R or I J K L               
  51. Helical? Y
  52.  
  53. Spaces? Y                             # Y or N  'Spaces between words     
  54.  
  55. Incremental? N                        # Y or N  'Inc or abs output        
  56. CtrIncremental? Y                     # Y or N  'Inc or abs I & J         
  57. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  58.  
  59. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  60.  
  61. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  62.  
  63. Drill                                 # Drilling canned/manual cycle      
  64. G98 G81 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  65. end cancel
  66.  
  67. Peck                                  # Pecking canned/manual cycle       
  68. G98 G83 X[H] Y[V] Z[D] Q[VBite] R[Vclear] F[FRate]
  69. end cancel
  70.  
  71. Tap                                   # Tapping canned/manual cycle       
  72. G98 G84 X[H] Y[V] Z[D] R[Vclear] F[FRate] P[Dwell]
  73. end cancel
  74.  
  75. LTap                                  # Left handed tapping cycle         
  76. G98 G74 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  77. end cancel
  78.  
  79. Ream                                  # Reaming canned/manual cycle       
  80. G98 G85 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  81. end cancel
  82.  
  83. Bore                                  # Boring canned/manual cycle        
  84. G98 G86 X[H] Y[V] Z[D] R[Vclear] F[FRate] P[Dwell]
  85. end cancel
  86.  
  87. Back                                  # Back boring canned/manual cycle   
  88. G98 G87 X[H] Y[V] Z[D] R[Vclear] F[FRate]
  89. end cancel
  90.  
  91. Cancel                                # Cancel a canned/manual cycle      
  92. G80
  93. end
  94.  
  95. Index X                               # Index the rotary table            
  96. G0 G28 g91 Z0
  97. A[RotAngle]
  98. G90 G0 G[Work] X[H] Y[V]
  99. Z[D] M[Cool]
  100. End
  101.  
  102. StartCode                             # Start of the program              
  103. %0
  104. O[Program#]
  105. End
  106.  
  107. 1stToolChange                         # First tool change                 
  108. G0 G40 G80
  109. g91 G28 Z0
  110. G30 X0 Y0
  111. N[Block] T[Tool]
  112. M6
  113. M[val1]
  114. G0 A[RotAngle]
  115. G0 G90 G[Work] X[H] Y[V]
  116. Z[D] M[Direct] S[Speed]
  117. M[Cool] T[NextTool]
  118. End
  119.  
  120. Infeed                                # Enable cutter comp                
  121. G17 G[Side] X[H] Y[V] D[DComp] F[FRate]
  122. end
  123.  
  124. Outfeed                               # Disable cutter comp               
  125. G1 G40 X[H] Y[V]
  126. Z[D]
  127. end
  128.  
  129. ToolChange                            # Secondary tool changes            
  130. M9
  131. G28 g91 Z0
  132. G30 X0 Y0
  133. N[Block] T[Tool]
  134. M6
  135. M[val1]
  136. G0 A[RotAngle]
  137. G0 G90 G[Work] X[H] Y[V]
  138. Z[D] M[Direct] S[Speed]
  139. M[Cool] T[NextTool]
  140. End
  141.  
  142. EndCode                               # End of the program                
  143. G28 g91 Z0
  144. G28 g91 X0 Y0 A0
  145. M30
  146. %0
  147. End
  148.  
  149. ask [val1] " Enter spindle range or press enter for default: " "38"
  150.